package chixing.day02;

public class WhileDemo {
    public static void main(String[] args) {
        int i=1;
//        while (i<=100){
//            System.out.println("i="+i);
//            i++;
//        }

        while (i<=100){
            if (i==50)
                break;
            System.out.println("i="+i);
            i++;
        }

        i=0;
        while (i<=100){
            i++;
            if (i==50)
                continue;//结束本次循环继续下次循环
            System.out.println("i="+i);
        }

        i=1;
        do{
            System.out.println("i="+i);
            i++;
        }while (i<=10);

        for (int n=0;n<=10;n++){
            System.out.println("n="+n);
        }

        //3行5列
        for (int x=1;x<=3;x++){
            for (int y=1;y<=5;y++){
                System.out.print("*");
            }
            System.out.println();
        }


    }
}
